<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <table border="1">
      <caption>
        table title
      </caption>
      <thead>
        <tr>
          <th>name</th>
          <th>age</th>
          <th>gender</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>jack</td>
          <td>20</td>
          <td>boy</td>
        </tr>
        <tr>
          <td>lili</td>
          <td>20</td>
          <td>girl</td>
        </tr>
      </tbody>

      <tfoot>
        <tr>
          <td>10</td>
          <td>20</td>
          <td>30</td>
        </tr>
      </tfoot>
    </table>
    <script>
      const table = document.body.children[0];
      console.log(table);
      console.log(table.rows);
      console.log(table.tHead.rows);
      console.log(table.tFoot.rows);
      console.log(table.tBodies[0].rows);
    </script>
  </body>
</html>
